/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sd.chat.web;

import com.sd.chat.Logger;

/**
 *
 * @author Old
 */
public class WebManager extends Thread {
    
    private int aCounter;
    private Logger log = new Logger(true);

    public WebManager() {
        
    }
    
    @Override
    public void run() {
        while(true){
            doStuff();
        }
    }
    
    public void doStuff(){
        setaCounter(getaCounter()+1);
        try {
                    log.outln("WebManager preparing to wait");
                    sleep(1000);
                } catch (InterruptedException e) {
                    log.erro("WebManager interruptedException caught");
                }
                log.outln("WebManager resuming");
    }

    public synchronized int getaCounter() {
        return aCounter;
    }

    public synchronized void setaCounter(int aCounter) {
        this.aCounter = aCounter;
    }
    
    
    
    
}
